<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/pub/includ.jsp"%>
<%@ include file="/pub/tree_common.jsp"%>
<HTML>
<HEAD>
</HEAD>
<BODY topmargin="0" leftmargin="0">
<table  height="100%" width="100%">
   <tr>
    <td valign="top">
	<center>
	<input type="button" onclick="doOnDblClick('')" class="button_nbw" value="确  认" />
	</center>
    <div id="treeObject" ></div>
    </td>
   </tr>
</table> 
<script>   
    tree=new dhtmlXTreeObject('treeObject',"100%","100%",0); 
    tree.setOnDblClickHandler(doOnDblClick);
    tree.setImagePath("<%=xtreePath%>"); 
    tree.enableDragAndDrop(false);   
    tree.setXMLAutoLoading("<%=path%>/sys/org/showTree");
    //tree.enableCheckBoxes(1);
    //tree.enableThreeStateCheckboxes(true); 
    //tree.enableRadioButtons(true);
    //tree.setOnDblClickHandler(doOnDblClick);
    //tree.enableHighlighting(true);
    //tree.enableTreeLines(false);
	//tree.setItemTopOffset('-1',0);
	//tree.setOnLoadingEnd(doOnClick);
    tree.loadXML("<%=path%>/sys/org/showTree");
    function doOnDblClick(nodeId){
    	if(nodeId == null || nodeId == '')
    		nodeId = tree.getSelectedItemId();
		window.returnValue = tree.getSelectedItemId()+"|"+tree.getSelectedItemText();
		window.close();
	}
	//function doOnDblClick(nodeId){
	//	alert(nodeId);
	//	return false;
	//}
</script> 
<script type="text/javascript">
	function refreshItem(nodeId){
		tree.refreshItem(nodeId);
		tree.focusItem(nodeId);
	}
	function deleteItem(nodeId){
		tree.deleteItem(nodeId);
	}
</script>
</body>
</html>
